<local:DocumentBase x:Class="WPFExcelReport.UBTAB05"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:ReflectionStudio.Components.UserControls;assembly=ReflectionStudio.Core" 
                    xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls"  
                    xmlns:VA="clr-namespace:WPFExcelReport;assembly=TVAART"
                    xmlns:VF="clr-namespace:WPFExcelReport;assembly=TVAFARBEN"
                    xmlns:KSL="clr-namespace:WPFExcelReport;assembly=TKSLEIST" 
                    xmlns:VKK="clr-namespace:WPFExcelReport;assembly=TVKKOPF" 
                    xmlns:VKP="clr-namespace:WPFExcelReport;assembly=TVKPOS" 
                    xmlns:WD="clr-namespace:WPFExcelReport;assembly=TWDECK" 
                    xmlns:AB="clr-namespace:WPFExcelReport;assembly=TABPOS" 
                    xmlns:AF="clr-namespace:WPFExcelReport;assembly=TABFOLGE" 
                    xmlns:APK="clr-namespace:WPFExcelReport;assembly=TAPKOPF" 
                    xmlns:APF="clr-namespace:WPFExcelReport;assembly=TAPFOLGE" 
                    xmlns:ATK="clr-namespace:WPFExcelReport;assembly=TAPARTK" 
                    xmlns:ATE="clr-namespace:WPFExcelReport;assembly=TAPARTE" 
                    xmlns:AE="clr-namespace:WPFExcelReport;assembly=TABARTE" 
                    xmlns:AMV="clr-namespace:WPFExcelReport;assembly=TAMVALUE" 
                    xmlns:WS="clr-namespace:WPFExcelReport;assembly=TWASTAMM"  
                    xmlns:WB="clr-namespace:WPFExcelReport;assembly=TWBDAT" 
                    xmlns:WBB="clr-namespace:WPFExcelReport;assembly=TWBBST" 
                     xmlns:MKF="clr-namespace:WPFExcelReport;assembly=TICC_MKRF"  
                    xmlns:ex="clr-namespace:WPFExcelReport.Controls;assembly=ExControls"                    
                    xmlns:Localization="clr-namespace:Localization;assembly=Localization"   
                    Name="TV" 
                   Loaded="Window_Loaded"
>
    <local:DocumentBase.Resources>
        <ucd:BoolToVisibilityConverter x:Key="bv"/>
        <ucd:NOTBoolToVisibilityConverter x:Key="nbv"/>
        <ucd:GB2312Convert8859P1  x:Key="gb2312"/>
        <ucd:NOTConverter x:Key="not"/>
        <ucd:SubStrConverter x:Key="substr"/>
    </local:DocumentBase.Resources>
    <Grid Margin="20,0,20,0">
      
        <Grid.RowDefinitions>
            <RowDefinition   Height="Auto" /> 
            <RowDefinition   Height="1*" />
            <RowDefinition   Height="2*" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="1*"/> 
            <ColumnDefinition Width="Auto"/>
        </Grid.ColumnDefinitions>
        <TabControl Grid.Row="1"  Grid.Column="1">
            <TabItem Header="{Binding Source={Localization:Translate Word=销售单}}">
                <WD:TPRWD02  
                       Name="cWD02"  
                       AUFART="K"
                       ARTST="F"  
                       IsOrder="False"
                       IsShowAB="{Binding IsShowAB,ElementName=cDI}"  
                       dwRule="{Binding dwRule,ElementName=cWD}" 
                       PARTIE="{Binding PARTIE,ElementName=cDIWB}"
                       IsVV="False"/>
            </TabItem>
            <TabItem  Header="{Binding Source={Localization:Translate Word=后整理}}">
                <WD:TZPRWD02 Grid.Row="3" Grid.Column="0" 
                         AUFART="VA" 
                         WDSA="V"
                         ARTST="F"  
                         Name="cVAPR" 
                         WZTYP="{Binding WZTYP,ElementName=cWD02}"                    
                         KRS="{Binding KRS,ElementName=cWD02}"
                         LFD="{Binding LFD,ElementName=cWD02}"
                         POS="{Binding POS,ElementName=cWD02}" 
                         EXAUF="{Binding PRART,ElementName=cWD02}" 
                         ABAUF="{Binding ABAUF,ElementName=TV}" 
                             />
            </TabItem>
            <TabItem  Header="{Binding Source={Localization:Translate Word=坯布卷}}" Name="cWBP">
                <WB:TDIWB02 Grid.Row="3" Grid.Column="0"  
                         ARTST="R"  
                         Name="cDIWB"  />
            </TabItem>
        </TabControl> 
        <TabControl  Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="4">
            <TabItem Header="{Binding Source={Localization:Translate Word=后整计划}}">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"></RowDefinition> 
                        <RowDefinition Height="1*"></RowDefinition>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions> 
                        <ColumnDefinition Width="1*"></ColumnDefinition>
                        <ColumnDefinition Width="1*"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <TextBlock Text="{Binding Source={Localization:Translate Word=后整理生产单}}" Grid.Row="0" Grid.Column="0" />
                    <WD:TVKWD2PR Grid.Row="1" Grid.Column="0" Margin="0,0,0,10"
                             Name="cWD"
                             ABKRS="{Binding ABKRS,ElementName=cWD02}"   
                             IsEdit="{Binding IsEdit,ElementName=cWD02}"  
                             ORDERNUM="{Binding KEY,ElementName=cWD02}"   
                             WZCMD="UBTWV04" />
                
                    <AB:TAB05RZ  Grid.Row="1" Grid.Column="1"  
                               POSTYP="VA "
                               MAKE2ORD="False"  
                               Name="cRZ"
                               IsDI="true" 
                               EXAUF="{Binding ABAUF,ElementName=TV}" 
                             /> 
                </Grid> 
            </TabItem>
            <TabItem Header="{Binding Source={Localization:Translate Word=坯布计划}}">
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="1*"/>
                        <ColumnDefinition Width="2*"/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition   Height="Auto" />
                        <RowDefinition   Height="1*" />
                    </Grid.RowDefinitions>
                    <AB:TWAB55DI  Grid.Row="0" Grid.RowSpan="2" Grid.Column="0"  
                                    POSTYP="DI "
                                     Name="cDI"
                                    dwWS="{Binding dwWS,ElementName=cRZ}"
                                    IsAuto="{Binding IsAB,ElementName=cWD}"
                                    IsReset="{Binding IsReset,ElementName=cRZ}" 
                              />

                    <Grid Grid.Row="0" Grid.RowSpan="2" Grid.Column="1"  >
                        <Grid.RowDefinitions>
                            <RowDefinition   Height="Auto" />
                            <RowDefinition   Height="1*" />
                        </Grid.RowDefinitions>
                        <WB:TSHWB04 Name="cWB04" Grid.Row="0"
                                    PARTIE="{Binding KDPARTIE,ElementName=cDI}"
                                    EXAUF="{Binding ABAUF,ElementName=cDI}"
                                dwABP="{Binding dwAB,ElementName=cDI}"
                                WH="{Binding WH,ElementName=cDI}"
                                VKDELDATE="{Binding VKDELDATE,ElementName=cDI}"
                               IsReset="{Binding IsReset,ElementName=cRZ}" 
                               />
                        <Grid Grid.Row="1">
                            <Grid.RowDefinitions>
                                <RowDefinition   Height="Auto" />
                                <RowDefinition   Height="1*" />
                            </Grid.RowDefinitions>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="1*"/>
                                <ColumnDefinition Width="1*"/>
                            </Grid.ColumnDefinitions>
                            <WBB:TWVWB25  Grid.Row="0" Grid.RowSpan="2" Grid.Column="0"
                                PRTYPE="UBTWVLB"
                                RWAUF="{Binding KEY,ElementName=cWB04}"
                                IsReset="{Binding IsReset,ElementName=cRZ}" 
                                BZ="{Binding KEY,ElementName=cWS02,Converter={StaticResource substr},ConverterParameter=20+2}"
                                />
                            <WS:TPWS02VAR  Grid.Column="1" Grid.Row="1" Name="cWS02"
                                           IsAuto="True"
                                           EXAUF="{Binding WAART,ElementName=cWB04}"
                                           />
                        </Grid>

                    </Grid>

                </Grid>
            </TabItem>
            <TabItem Header="{Binding Source={Localization:Translate Word=生产单明细}}" Name="ZoneAV">

                <AF:TAB10  Name="cABF" Grid.Column="1" 
                           IsCanLoad="{Binding IsSelected,ElementName=ZoneAV}"
                            dwABP="{Binding dwAB,ElementName=cRZ}" 
                            EXAUF="{Binding KEY,ElementName=cRZ}"/>

            </TabItem>
            <TabItem Header="{Binding Source={Localization:Translate Word=分批状态}}" Name="ZoneMK">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="1*"/>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="1*"></ColumnDefinition>
                        <ColumnDefinition Width="1*"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <WrapPanel  Grid.Row="0" Grid.Column="1" Grid.ColumnSpan="2" >
                        <AB:TAB04TP 
                             EXAUF="{Binding KEY,ElementName=cRZ}"
                            Name="cTP" 
                                    />
                    </WrapPanel>
                    <WBB:TAV04  Name="cWB" Grid.Row="1" Grid.Column="1"
                           EXAUF="{Binding ABTP,ElementName=cTP}"/>
                    <MKF:TMKRFABP  Grid.Row="1" Grid.Column="0"
                     IsCanLoad="{Binding IsSelected,ElementName=ZoneMK}"
                    EXAUF="{Binding KEY,ElementName=cRZ}"/>
                </Grid>
              
            </TabItem>   
            <TabItem  Header="{Binding Source={Localization:Translate Word=坯布布卷}}" Name="cPU">
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="1*"/>
                        <ColumnDefinition Width="1*"/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition   Height="Auto" />
                        <RowDefinition   Height="Auto" />
                        <RowDefinition   Height="1*" />
                    </Grid.RowDefinitions>  
                    <WD:TWDTYP EXAUF="{Binding KEY,ElementName=cRZ}" 
                                   Name="cWDZ"
                                   WDTYP="B" Grid.Row="1"  Grid.Column="0"
                               IsReset="{Binding IsReset,ElementName=cRZ}" 
                                   />
                    <WBB:TWBFREE  IsCanLoad="{Binding IsSelected,ElementName=cPU}"
                                  EXAUF="{Binding PRART,ElementName=cWDZ}"  
                                  Grid.Row="2"  Grid.Column="0"
                                  Name="cWBF"
                                   LO="01"
                                   LB="PB" 
                                  IsReset="{Binding IsReset,ElementName=cRZ}" 
                                   />
                    <WBB:TWZ12  EXAUF="{Binding KEY,ElementName=cRZ}" 
                                IsWZChg="{Binding IsWZChg,ElementName=cWBF}"
                                Grid.Row="2"  Grid.Column="1" 
                                IsReset="{Binding IsReset,ElementName=cRZ}" 
                                   />
                </Grid>

            </TabItem>
            <TabItem  Header="{Binding Source={Localization:Translate Word=回修管理}}" Name="cHX">
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="1*"/>
                        <ColumnDefinition Width="1*"/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition   Height="Auto" />
                        <RowDefinition   Height="1*" /> 
                        <RowDefinition   Height="1*" />
                    </Grid.RowDefinitions>
                    <AB:TAB05RP  Name="cABRP"  
                                 Grid.Row="1"  Grid.Column="0" 
                                EXAUF="{Binding RPAUF,ElementName=cRP}"
                                dwWS="{Binding dwWS,ElementName=cRZ}"
                                 IsReset="{Binding IsReset,ElementName=cRZ}" 
                                 />
                    <AF:TAB05AV12   EXAUF="{Binding ABAUF,ElementName=cRZ}"
                                Name="cRP"
                                Grid.Row="1"  Grid.Column="1"/>
                   
                    <WBB:TWZAV12  Grid.Row="2"  Grid.Column="0"
                                  EXAUF="{Binding KEY,ElementName=cRP}"  
                                  RPAUF="{Binding RPAUF,ElementName=cRP}"
                                  IsWZChg="{Binding IsWZChg,ElementName=cWZAM}"
                                  Name="cWZAV12"
                                  IsReset="{Binding IsReset,ElementName=cRZ}" 
                                   />
                    <WBB:TWZ12  EXAUF="{Binding KEY,ElementName=cABRP}"  
                                Grid.Row="2"  Grid.Column="1"
                                Name="cWZAM"
                                IsReset="{Binding IsReset,ElementName=cRZ}" 
                              />
                </Grid>

            </TabItem>
            <TabItem Header="{Binding Source={Localization:Translate Word=工艺管理}}" Name="cPF">
                <Grid  >
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="1*"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                    </Grid.RowDefinitions>
                    <WrapPanel  Grid.Row="0">
                        <TextBlock Text="{Binding Source={Localization:Translate Word=选择流程:}}" Margin="20,0,0,0"/>
                        <APK:TSAP02  Margin="20,0,0,0" ARTST="F" Name="cAP02" IsEdit="True"/>
                    </WrapPanel>

                    <APF:TAP02  Grid.Row="1"  EXAUF="{Binding KEY,ElementName=cAP02}" Name="cAP04"
                                       dwAPF="{Binding dwNAPF,ElementName=cABF}" 
                                       />
                    <Expander Grid.Row="2"      IsExpanded="False" Header="{Binding Source={Localization:Translate Word=工艺条件}}">
                        <ATK:TAPARTK Name="cAP05"   EXAUF="{Binding KEY,ElementName=cAP04}"   />
                    </Expander>
                    <Expander Grid.Row="3"     IsExpanded="False" Header="{Binding Source={Localization:Translate Word=工艺参数}}">
                        <ATE:TAPARTE   IsAuto="False"  EXAUF="{Binding KEY,ElementName=cAP05}"   />
                    </Expander> 
                </Grid>
            </TabItem>
            <TabItem Header="{Binding Source={Localization:Translate Word=品种工艺}}"  Name="cGY">
                <WS:TWLWS03 Name="cWS"
                ORDERNUM="{Binding PRART,ElementName=cRZ}"
                dwWS="{Binding dwWS,ElementName=cRZ}"
               IsReset="{Binding IsReset,ElementName=cRZ}" 
                />
            </TabItem>
            <TabItem  Header="{Binding Source={Localization:Translate Word=明细布卷}}" Name="cWB03" 
                       >
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="1*"/>
                        <ColumnDefinition Width="1*"/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition   Height="Auto" />
                        <RowDefinition   Height="Auto" />
                        <RowDefinition   Height="1*" />
                    </Grid.RowDefinitions>
                    <WBB:TDIWB25 Grid.Row="2" Grid.Column="0" 
                                 IsPage="True" Rows="50"
                            SKEY1="WBBART"
                           KEY1="WBBISTKLG"
                           TKEY1="总长度"
                            RWAUF="{Binding KEY,ElementName=cDIWB}" 
                             />
                </Grid> 
            </TabItem>
        </TabControl>
    </Grid>
</local:DocumentBase>
    
